import {defineStore} from 'pinia' //引入pinia
import router from '../../router/routerindex.js'
//这里官网是单独导出  是可以写成默认导出的  官方的解释为大家一起约定仓库用use打头的单词 固定统一小仓库的名字不易混乱
export const useStorePublicMain = defineStore("PublicMain", {
  state: () => {
    return ({
      currenttab: 'home',
      configDialogShow: false,
      ziyuanurl: '',
      historylist:[]
    })
  },
  actions: {
    goToPage(path) {
      router.push({
        path: path
      });
    },
    reload(tab, index) {
      router.go(0);
    },
  },
})
